home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 50
/
Volume 50 - JOGO DISK .iso
/
Games
/
marionettemadness.swf
/
scripts
/
frame_1
/
DoAction_2.as
next >
Wrap
Text File
|
2007-10-01
|
1KB
|
62 lines
function inumerateObjects(thisOBJ, level)
{
for(i in thisOBJ)
{
var _loc1_ = "";
if(i != "_type")
{
j = 0;
while(j < level)
{
_loc1_ += "-->";
j++;
}
_loc1_ += i;
if(thisOBJ[i]._type != undefined)
{
_loc1_ += " (" + thisOBJ[i]._type + ")";
}
if(!(thisOBJ[i] instanceof Object))
{
_loc1_ += " = " + thisOBJ[i];
}
trace(_loc1_);
}
inumerateObjects(thisOBJ[i],level + 1);
}
}
function checkDataLoad(tgtObj)
{
var _loc2_ = _root.xmlDataContainer[tgtObj];
inumerateObjects(_loc2_,0);
}
function getXMLObj(url, tgtObj, outXML, callback)
{
trace("getting XML Object:");
var _loc3_ = new XML2();
delete _root.xmlDataContainer[tgtObj];
XMLLoaded = false;
_loc3_.onLoad = function(success)
{
if(success)
{
_root.xmlDataContainer[tgtObj] = new XML2Object().parseXML(this);
callback();
}
else
{
trace("error loading " + tgtObj);
}
};
if(outXML == undefined)
{
_loc3_.load(url);
}
else
{
outXML.load(url,_loc3_);
}
}
_root.xmlDataContainer = new Object();
trace(_root.xmlDataContainer);